package com.carl.zlds.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.carl.zlds.dao.sqlprovider.ArticleSqlProvider;
import com.carl.zlds.model.Article;
import com.carl.zlds.pojo.dto.ArticleSearchDTO;
import com.carl.zlds.pojo.vo.ArticleVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * @author carl
 */
public interface ArticleMapper extends BaseMapper<Article> {
    @SelectProvider(type = ArticleSqlProvider.class, method = "getArticleList")
    List<ArticleVO> getArticleList(@Param("dto") ArticleSearchDTO dto, @Param("limitSql") String limitSql);

    @SelectProvider(type = ArticleSqlProvider.class, method = "getArticleList")
    Integer countArticleList(@Param("dto") ArticleSearchDTO dto, @Param("limitSql") String limitSql);
}
